<div class="card border-info m-3">
    <h5 class="card-header bg-info text-white">修改</h5>
    <div class="card-body">
        <h5 class="card-title">基础信息</h5>
        <p class="card-text">请按内容提示，录入相关信息。</p>
        <div class="row mb-3">
            <div class="col-6">
                <ng-select [items]="extend.domain.serAndroidChannelType.items"
                           bindLabel="name" bindValue="id"
                           [searchable]="true" [multiple]="false" [closeOnSelect]="true"
                           placeholder="{{extend.domain.serAndroidChannelType.nickname}}"
                           tooltip="{{extend.domain.serAndroidChannelType.nickname}}"
                           [(ngModel)]="domain.serAndroidChannelType"
                           (change)="extend.domain.serAndroidChannelType.change($event)">
                </ng-select>
                <span class="badge badge-danger"
                      *ngIf="errRes.error?.detail['ConVersion.serAndroidChannelType'] !== null">{{errRes.error?.detail['ConVersion.serAndroidChannelType']}}</span>
            </div>
            <div class="col-6">
                <ng-select [items]="extend.domain.enumAppStoreUp.items"
                           bindLabel="name" bindValue="id"
                           [searchable]="true" [multiple]="false" [closeOnSelect]="true"
                           placeholder="{{extend.domain.enumAppStoreUp.nickname}}"
                           tooltip="{{extend.domain.enumAppStoreUp.nickname}}"
                           [(ngModel)]="domain.enumAppStoreUp"
                           (change)="extend.domain.enumAppStoreUp.change($event)">
                </ng-select>
                <span class="badge badge-danger"
                      *ngIf="errRes.error?.detail['ConVersion.enumAppStoreUp'] !== null">{{errRes.error?.detail['ConVersion.enumAppStoreUp']}}</span>
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">APP版本号</button>
                    </div>
                    <input type="text" class="form-control border-info" [(ngModel)]="domain.serVersionNumber">
                </div>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['ConVersion.serVersionNumber'] !== null">{{errRes.error?.detail['ConVersion.serVersionNumber']}}</span>
            </div>
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">内部对比版本号</button>
                    </div>
                    <input type="text" class="form-control border-info border-right-0"
                           [(ngModel)]="domain.serBuildNo">
                    <div class="input-group-append">
                        <span class="input-group-text border-info bg-white">整数</span>
                    </div>
                </div>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['ConVersion.serBuildNo'] !== null">{{errRes.error?.detail['ConVersion.serBuildNo']}}</span>
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">版本名称</button>
                    </div>
                    <input type="text" class="form-control border-info" [(ngModel)]="domain.serVersionName">
                </div>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['ConVersion.serVersionName'] !== null">{{errRes.error?.detail['ConVersion.serVersionName']}}</span>
            </div>
            <div class="col-6">
            </div>
        </div>

        <div class="row mb-3">
            <div class="col-6">
                <input type="hidden" class="form-control border-info" [readonly]="true"
                       [(ngModel)]="domain.serAudit">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">审核状态</button>
                    </div>
                    <input type="text" class="form-control border-info" [readonly]="true"
                           [value]="extend.domain.serAudit.nickname">
                </div>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['ConVersion.serAudit'] !== null">{{errRes.error?.detail['ConVersion.serAudit']}}</span>
            </div>
            <div class="col-6">
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-6">
                <ng-container aria-label="ossUpload">
                    <div class="text-center mb-2"
                         *ngIf="domain.serFileUrl !== null && domain.serFileUrl !== undefined && domain.serFileUrl.length > 0">
                        <img [src]="domain.serFileUrl" style="height: 15rem;">
                        <p><span class="badge badge-success">{{domain.serFileUrl}}</span></p>
                    </div>
                    <input #file class="displayNone" type="file" ng2FileSelect
                           [uploader]="extend.domain.file.oss.uploader"
                           (change)="extend.domain.file.change($event)"/>
                </ng-container>
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">图片上传</button>
                    </div>
                    <div class="input-group-append w-75">
                        <button class="btn btn-default border-info w-100" type="button" (click)="file.click()">选择</button>
                    </div>
                </div>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['ConVersion.serFileUrl'] !== null">{{errRes.error?.detail['ConVersion.serFileUrl']}}</span>
            </div>
            <div class="col-6">
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-12">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">简要说明</button>
                    </div>
                    <input type="text" class="form-control border-info" [(ngModel)]="domain.serVersionContent">
                </div>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['ConVersion.serVersionContent'] !== null">{{errRes.error?.detail['ConVersion.serVersionContent']}}</span>
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-12">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">下载地址</button>
                    </div>
                    <input type="text" class="form-control border-info" [(ngModel)]="domain.serDownloadAddress">
                </div>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['ConVersion.serDownloadAddress'] !== null">{{errRes.error?.detail['ConVersion.serDownloadAddress']}}</span>
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-6">
                <ng-select [dropdownPosition]="'top'"
                           [searchable]="true" bindLabel="name" bindValue="id"
                           placeholder="强制类型" tooltip="强制类型"
                           [items]="[{id:'YES',name:'是'},{id:'NO',name:'否'}]"
                           [(ngModel)]="domain.serVersionUpgrade">
                </ng-select>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['serVersionUpgrade.serDownloadAddress'] !== null">{{errRes.error?.detail['ConVersion.serVersionUpgrade']}}</span>
            </div>
            <div class="col-6">
                <ng-select [dropdownPosition]="'top'"
                           [searchable]="true" bindLabel="name" bindValue="id"
                           placeholder="操作系统" tooltip="操作系统"
                           [items]="[{id:'ANDROID',name:'安卓'},{id:'IOS',name:'IOS'}]"
                           [(ngModel)]="domain.serOperatingSystem">
                </ng-select>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['serVersionUpgrade.serOperatingSystem'] !== null">{{errRes.error?.detail['ConVersion.serOperatingSystem']}}</span>
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-12">
                <div [froalaEditor]='froalaEditorOptions' [(froalaModel)]="domain.serEditorContent">Hello, Froala!</div>
            </div>
        </div>

        <div class="text-center mt-5">
            <button type="button" class="btn btn-outline-primary" (click)="func.update.req($event)">修改</button>
        </div>
    </div>
</div>

<span class="badge badge-info mr-3" *ngIf="errRes?.error?.timestamp !== null">response time: {{errRes?.error?.timestamp}}</span>

<div *ngIf="false">
    <p>{{errRes?.error}}</p>
    <p>{{errRes?.error?.code}}</p>
    <p>{{errRes?.error?.description}}</p>
    <p>{{errRes?.error?.theme}}</p>
    <p>{{errRes?.error?.timestamp}}</p>
    <p>{{errRes?.error?.detail?.RR?.duration}}</p>
    <p>{{errRes?.error?.detail['ConVersion.serNum']}}</p>
    <p>{{errRes?.error?.detail['ConVersion.serAudit']}}</p>
    <p>{{errRes?.error?.detail['ConVersion.serValid']}}</p>
    <p>{{errRes?.error?.detail['ConVersion.serValid2']}}</p>
    <p>{{errRes?.headers}}</p>
    <p>{{errRes?.message}}</p>
    <p>{{errRes?.name}}</p>
    <p>{{errRes?.ok}}</p>
    <p>{{errRes?.status}}</p>
    <p>{{errRes?.statusText}}</p>
    <p>{{errRes?.url}}</p>
</div>
